package com.wushijia.designpatterns.observer.jdk;

import com.wushijia.designpatterns.observer.bug.LotteryResult;
import java.util.Observable;
import java.util.Observer;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class EventManagerObserver implements Observer {

  public void update(Observable observable, Object obj) {
    LotteryResult result = (LotteryResult) obj;
    log.info("给用户 {} 发送通知(短信)：{}", result.getUid(), result.getLottery());
  }
}
